const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/D-jGOJGr1IFCgA.js","assets/DrFvzlh8agutd.js","assets/MpnPZlTSagutd.js","assets/9ND1FmV62IPdvA.css","assets/Bb7SYMq110LR2Q.js","assets/sf48gIWk3aD96J.js","assets/DC8MLyRD3E5Auu.js","assets/DZFz6IIX1esOcA.js"])))=>i.map(i=>d[i]);
import{_ as f}from"./MpnPZlTSagutd.js";import{p as _,s as c}from"./DrFvzlh8agutd.js";import{a as I}from"./DZFz6IIX1esOcA.js";import{a as k,e as g}from"./sf48gIWk3aD96J.js";function y(t="e-invoice.space",a){const o=new Date,s=a??t;return{author:t,title:"E-Invoice",subject:"E-Invoice",keywords:["e-invoice","invoice","zugferd","xrechnung","pdfa","en16931"],producer:s,creatorTool:s,documentCreationDate:o,documentModificationDate:o,metadataModificationDate:o}}const l="xml2invoice.com";function D(){return y(l,`${l} 1.13.1`)}const n=_("rt:import",!1);async function R(t=500){k(`Import ${t} sample invoices`,async a=>{if(!c.workspace){n.error("Workspace is not ready!");return}const{generateFakeInvoicesForReceiptsSpace:o}=await f(async()=>{const{generateFakeInvoicesForReceiptsSpace:e}=await import("./D-jGOJGr1IFCgA.js");return{generateFakeInvoicesForReceiptsSpace:e}},__vite__mapDeps([0,1,2,3,4,5])),{createInvoice:s}=await f(async()=>{const{createInvoice:e}=await import("./DC8MLyRD3E5Auu.js");return{createInvoice:e}},__vite__mapDeps([6,1,2,3,7,5]));a.setMax(t+3);const i=o({countReceipts:t}),v=i.items,u=i.pdf;a.incResolved(1);for(const e of v)n("sample",e),c.workspace.createItem(e);a.incResolved(1);for(const e of u)g("",async r=>{const p=r.payload,w=await s(p,{pdfa:!0,meta:D()}),d=await c.workspace?.sync?.createAsset(w,{type:"application/pdf"});if(d){const m=I(d);m&&c.workspace?.updateItem(p.id,{asset:m})}r.incResolved(1)},e)}),n("end bulk")}export{y as g,R as i};